package net.chrisjrock.loader.bulletloader
{
	public class BulletLoadRequest implements IBulletLoadRequest
	{
		protected var type:String;
		protected var url:String;
		protected var priority:Number;
		protected var data:Object = {};
		
		/**
		 * Basic implementation of IBulletRequest.
		 * @author Chris J. Rock
		 */
		public function BulletLoadRequest(type:String , url:String)
		{
			this.url = url;
		}
		
		/**
		 * @inheritDoc
		 */
		public function getType():String
		{
			return type;
		}
		
		/**
		 * @inheritDoc
		 */
		public function setType (value:String):void
		{
			type = value;
		}
		
		/**
		 * @inheritDoc
		 */
		public function getUrl():String
		{
			return url;
		}
		
		/**
		 * @inheritDoc
		 */
		public function setUrl (value:String):void
		{
			url = value;
		}
		
		/**
		 * @inheritDoc
		 */
		public function getPriority():Number
		{
			return priority;
		}
		
		/**
		 * @inheritDoc
		 */
		public function setPriority (value:Number):void
		{
			priority = value;
		}
		
		/**
		 * @inheritDoc
		 */
		public function getData():Object
		{
			return data;
		}
		
		/**
		 * @inheritDoc
		 */
		public function setData (value:Object):void
		{
			if (value == null)
			{
				data = {};
				return;
			}
			
			data = value;
		}
	}
}